#include "sendmailthread.h"
#include "smtpinvoker.h"

SendMailThread::SendMailThread(QString _playerEmail,QString _password,
        QString _smtpServer, QString _ownerEmail, QString _subject,QString _content,QObject *parent)
    :QThread(parent),playerEmail(_playerEmail),password(_password),smtpServer(_smtpServer),
      ownerEmail(_ownerEmail),subject(_subject),content(_content)
{
}


void SendMailThread::run()
{
    SMTPInvoker smtp;
    smtp.Connect(smtpServer);
    smtp.Login(playerEmail,password);
    smtp.Send(playerEmail,ownerEmail,subject,content);
    smtp.Quit();
}
